package com.itheima.service;

import com.itheima.domain.Classes;
import com.itheima.domain.Student;
import com.itheima.mapper.ClassesMapper;
import com.itheima.utils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class ClassesServiceTest {
    @Test
    public void findAll(){
        SqlSession sqlSession = MyBatisUtils.getSqlSession();
        ClassesMapper mapper = sqlSession.getMapper(ClassesMapper.class);
        List<Classes> list = mapper.findAll();
        for (Classes classes : list) {
            System.out.println(classes);
        }
        sqlSession.close();
    }
}
